% scatter(-mu, 0, 500, 'k', 'filled'); % 100 is the marker size
scatter(-mu, 0, 500, [0.5 0.5 0.5], 'filled'); % 100 is the marker size
set(gca, 'FontSize', 14);  % Set the font size for the axis tick labels
% xlim([0.78, 1.21]);
% ylim([-0.135, 0.20]);
xlim([0.67, 1.36]);
ylim([-0.15, 0.37]);
hold on

% x = 1-mu-r_lagrange_1;
% y = 0;
% x_2 = 1-mu+r_lagrange;
% cross = 0.01;
% plot([x - cross, x + cross], [y - cross, y + cross], 'k-');  % Diagonal line from bottom-left to top-right
% plot([x - cross, x + cross], [y + cross, y - cross], 'k-');  % Diagonal line from top-left to bottom-right
% plot([x_2 - cross, x_2 + cross], [y - cross, y + cross], 'k-');  % Diagonal line from bottom-left to top-right
% plot([x_2 - cross, x_2 + cross], [y + cross, y - cross], 'k-');  % Diagonal line from top-left to bottom-right

scatter(1-mu, 0, 80, [0.5 0.5 0.5], 'filled'); % 100 is the marker size
% scatter(1-mu, 0, 60, 'b', 'filled'); % 100 is the marker size
dotsize = 1;



% bfx = lower_orbits(5).data;
% k=6;
% convert_xy_vector
% plot(plot_x, plot_y, 'o', 'MarkerSize', dotsize, 'Color', 'k');
% 
% 
% 
% bfx = lower_orbits(4).data;
% k=28;
% convert_xy_vector
% plot(plot_x, plot_y, 'o', 'MarkerSize', dotsize, 'Color', 'k');
% 
% 
% bfx = lower_orbits(6).data;
% k=1;
% convert_xy_vector
% plot(plot_x, plot_y, 'o', 'MarkerSize', dotsize, 'Color', 'r');

bfx = lower_orbits(5).data;
k=1;
convert_xy_vector
plot(plot_x, plot_y, 'o', 'MarkerSize', dotsize, 'Color', 'b');


end_step = size(bfx)*[0;1];
rgbspeed = 1.7;
% rgbspeed = 2.0;


for k = 2:end_step-1
    convert_xy_vector
    % rgbValues = [1, 0.97*max(0,(1-1.0*(k-1)/(end_step-2))), 0.97*max(0,(1-1.0*(k-1)/(end_step-2)))];  % white to red
    rgbValues = [1, max(0,(1-rgbspeed*(k-1)/(end_step-2))), max(0,(1-rgbspeed*(k-1)/(end_step-2)))]; %
    % rgbValues = [min(1,rgbspeed*(k-1)/(end_step-1)), 0, 1-min(1,rgbspeed*(k-1)/(end_step-1))];
    % rgbValues = [min(1,rgbspeed*(k-1)/(end_step-1)), 1-min(1,rgbspeed*(k-1)/(end_step-1)), 1-min(1,rgbspeed*(k-1)/(end_step-1))];
    plot(plot_x, plot_y, 'o', 'MarkerSize', dotsize, 'Color', rgbValues);
end

k=end_step;
convert_xy_vector
plot(plot_x, plot_y, 'o', 'MarkerSize', dotsize, 'Color', 'k');